package jp.seraph.same.controller;

import jp.seraph.jsade.action.ActionCreator;
import jp.seraph.same.core.EditorMotionSelector;

public class DefaultAgentController implements AgentController {
    public DefaultAgentController(EditorMotionSelector aSelector, ActionCreator aActionCreator) {
        mSelector = aSelector;
        mActionCreator = aActionCreator;
    }

    private EditorMotionSelector mSelector;
    private ActionCreator mActionCreator;

    /**
     *
     * @see jp.seraph.same.controller.AgentController#beam(double, double,
     *      double)
     */

    public void beam(double aX, double aY, double aZ) {
        mSelector.setAction(mActionCreator.createBeamAction(aX, aY, aZ));
    }

    public void endPermanentBeam() {
        mSelector.setPermanentAction(null);
    }

    public void startPermanentBeam(double aX, double aY, double aZ) {
        mSelector.setPermanentAction(mActionCreator.createBeamAction(aX, aY, aZ));
    }
}
